package com.aabbc.order.controller;


import com.aabbc.order.entity.OrderInfo;
import com.aabbc.order.service.IOrderInfoService;
import com.aabbc.user.entity.UserInfo;
import com.aabbc.user.facade.IUserInfoFacade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author chenhai
 * @since 2019-11-01
 */
@RestController
@RequestMapping("/orderInfo")
public class OrderInfoController {

    @Autowired
    IOrderInfoService orderInfoService;

    @Autowired
    IUserInfoFacade userInfoFacade;

    @GetMapping("/test")
    public String test(){
        return "OrderInfoController.test";
    }

    @GetMapping("/list")
    public List<OrderInfo> queryOrderInfoList(){
        return orderInfoService.list();
    }

    @GetMapping("/userList")
    public List<UserInfo> queryUserInfoList(){
        return userInfoFacade.queryUserInfoList();
    }
}

